package com.business.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.business.domain.Loan;
import com.business.domain.LoanExample;
import com.business.domain.LoanVo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository("loanMapper")
public interface LoanMapper {
    int countByExample(LoanExample example);

    int deleteByExample(LoanExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Loan record);

    int insertSelective(Loan record);

    List<Loan> selectByExample(LoanExample example);

    Loan selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Loan record, @Param("example") LoanExample example);

    int updateByExample(@Param("record") Loan record, @Param("example") LoanExample example);

    int updateByPrimaryKeySelective(Loan record);

    int updateByPrimaryKey(Loan record);
    /**
     * 根据条件查询 银行贷款产品
     * @param map
     * @return
     */
    List<LoanVo> getBankList(Map<String, String> map);
    /**
     * 根据条件查询 P2p贷款产品
     * @param map
     * @return
     */
    List<LoanVo> getP2PList(Map<String, String> map);
    
    List<LoanVo> getAllLoan();
}